package com.ruoyi.outcome.service.impl;

import java.util.Collections;
import java.util.List;

import com.ruoyi.outcome.domain.vo.ResearchOutcomeTrack;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.outcome.mapper.ResearchOutcomeMapper;
import com.ruoyi.outcome.domain.ResearchOutcome;
import com.ruoyi.outcome.service.IResearchOutcomeService;

/**
 * 科研项目成果Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-06
 */
@Service
public class ResearchOutcomeServiceImpl implements IResearchOutcomeService 
{
    @Autowired
    private ResearchOutcomeMapper researchOutcomeMapper;

    /**
     * 查询科研项目成果
     * 
     * @param outcomeId 科研项目成果主键
     * @return 科研项目成果
     */
    @Override
    public ResearchOutcome selectResearchOutcomeByOutcomeId(Long outcomeId)
    {
        return researchOutcomeMapper.selectResearchOutcomeByOutcomeId(outcomeId);
    }

    /**
     * 查询科研项目成果列表
     * 
     * @param researchOutcome 科研项目成果
     * @return 科研项目成果
     */
    @Override
    public List<ResearchOutcome> selectResearchOutcomeList(ResearchOutcome researchOutcome)
    {
        return researchOutcomeMapper.selectResearchOutcomeList(researchOutcome);
    }

    /**
     * 新增科研项目成果
     * 
     * @param researchOutcome 科研项目成果
     * @return 结果
     */
    @Override
    public int insertResearchOutcome(ResearchOutcome researchOutcome)
    {
        return researchOutcomeMapper.insertResearchOutcome(researchOutcome);
    }

    /**
     * 修改科研项目成果
     * 
     * @param researchOutcome 科研项目成果
     * @return 结果
     */
    @Override
    public int updateResearchOutcome(ResearchOutcome researchOutcome)
    {
        return researchOutcomeMapper.updateResearchOutcome(researchOutcome);
    }

    /**
     * 批量删除科研项目成果
     * 
     * @param outcomeIds 需要删除的科研项目成果主键
     * @return 结果
     */
    @Override
    public int deleteResearchOutcomeByOutcomeIds(Long[] outcomeIds)
    {
        return researchOutcomeMapper.deleteResearchOutcomeByOutcomeIds(outcomeIds);
    }

    /**
     * 删除科研项目成果信息
     * 
     * @param outcomeId 科研项目成果主键
     * @return 结果
     */
    @Override
    public int deleteResearchOutcomeByOutcomeId(Long outcomeId)
    {
        return researchOutcomeMapper.deleteResearchOutcomeByOutcomeId(outcomeId);
    }

    @Override
    public int insertResearchOutcomeAudit(ResearchOutcomeTrack researchOutcomeTrack) {
        return researchOutcomeMapper.insertResearchOutcomeAudit(researchOutcomeTrack);
    }

    @Override
    public List<ResearchOutcomeTrack> selectResearchOutcomeAuditList(Long outcomeId) {
        return researchOutcomeMapper.selectResearchOutcomeAuditList(outcomeId);
    }
}
